JavaScript 算法基础

Do what you want